Skip to content

Bind GraphService to Wails frontend - #50

Merged
joshuapare merged 1 commit into
mainfrom
feat/bind-graph-service-v2
Mar 28, 2026
Merged

Bind GraphService to Wails frontend#50
joshuapare merged 1 commit into
mainfrom
feat/bind-graph-service-v2

Conversation

@joshuapare

@joshuapare joshuapare commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Register GraphService as a Wails service in main.go, exposing graph traversal methods to the UI
  • Adds generated TypeScript bindings for GetRelated, GetRelationshipChain, and GetDependencyTree
  • Replaces the prior feat/bind-graph-service branch which was based on the pre-wails3 codebase

Test plan

  • Verify task dev starts without errors
  • Confirm graph service methods are callable from the frontend

Summary by CodeRabbit

  • New Features
    • Graph and dependency analysis service now available for querying resource relationships
    • New functions to retrieve dependency trees for resources, discover related resources by relationship type, and trace relationship paths across your resource graph with configurable depth limits

Register the resource GraphService as a Wails service, exposing
GetRelated, GetRelationshipChain, and GetDependencyTree to the UI.
@coderabbitai

coderabbitai Bot commented Mar 27, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 6ae9e1c3-c89f-41b0-99a7-cf971afc389f

📥 Commits

Reviewing files that changed from the base of the PR and between 696ec38 and 4a6d063.

📒 Files selected for processing (5)
  • main.go
  • packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/graph/index.ts
  • packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/graph/models.ts
  • packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/graphservice.ts
  • packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/index.ts

📝 Walkthrough

Walkthrough

The PR introduces a new GraphService for dependency graph operations with three query functions (GetDependencyTree, GetRelated, GetRelationshipChain). Backend initialization wires the service in main.go, while corresponding TypeScript bindings are auto-generated including model classes for graph structures and frontend-accessible service functions.

Changes

Cohort / File(s) Summary
Backend Service Registration
main.go
Constructs and registers GraphService instance using resourceController.Graph() and adds it to Wails services before settings/bootstrap initialization.
TypeScript Graph Models
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/graph/models.ts, index.ts
Auto-generated model classes (DependencyNode, DependencyTree, GraphEdge, GraphNode) with constructors, defaults, and static createFrom() factory methods for JSON/object conversion; re-exports RelationshipType type alias.
TypeScript Service Bindings
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/graphservice.ts
Auto-generated Wails bindings for three graph query functions: GetDependencyTree, GetRelated, GetRelationshipChain; each accepts plugin/resource identifiers plus query parameters and returns typed graph models.
Resource Module Exports
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/index.ts
Adds GraphService re-export alongside existing ServiceWrapper export.

Sequence Diagram(s)

sequenceDiagram
    participant Client as Frontend Client
    participant Wails as Wails Runtime
    participant GraphService as GraphService Backend
    participant Graph as Graph Engine

    Client->>Wails: GetDependencyTree(pluginID, connectionID, resourceKey, ...)
    Wails->>GraphService: GetDependencyTree(...)
    GraphService->>Graph: Query dependency structure
    Graph-->>GraphService: Raw graph data
    GraphService-->>Wails: Typed DependencyTree result
    Wails->>Client: DependencyTree (model instance)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related issues

  • Bind GraphService to Wails frontend #31: Directly related—PR implements the GraphService backend initialization and auto-generated TypeScript bindings required to expose graph query capabilities through the Wails application framework.

Poem

🐰 A graph service hops through the code,
Mapping dependencies along the road,
DependencyNodes and TreesNow spring to life,
Wails and TypeScript, no more strife! 🌳✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Bind GraphService to Wails frontend' directly and clearly summarizes the main change: registering the GraphService as a Wails service to expose it to the frontend, which is the central objective of the PR.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/bind-graph-service-v2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@joshuapare
joshuapare merged commit e92d797 into main Mar 28, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant